/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package proyectoconcesionarios;

import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

/**
 *
 * @author Krum
 */
public class JFPrincipal extends javax.swing.JFrame {

    /**
     * Creates new form JFPrincipal
     */
    public JFPrincipal() {
        initComponents();
        this.setTitle("Concesionarios Vivó");
        this.setLocationRelativeTo(null);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenuArchivo = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();
        VerCoches = new javax.swing.JMenu();
        InsertarCoche = new javax.swing.JMenuItem();
        EliminarCoche = new javax.swing.JMenuItem();
        ActualizarCoche = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        VistaTabla = new javax.swing.JMenuItem();
        VistaForm = new javax.swing.JMenuItem();
        AcercaDe = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setIcon(new javax.swing.ImageIcon("C:\\Users\\Krum\\Documents\\NetBeansProjects\\ProyectoConcesionarios\\morgan4.jpg")); // NOI18N

        jMenuArchivo.setText("Archivo");

        jMenuItem2.setText("Salir");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenuArchivo.add(jMenuItem2);

        jMenuBar1.add(jMenuArchivo);

        VerCoches.setText("Concesionario");

        InsertarCoche.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, java.awt.event.InputEvent.CTRL_MASK));
        InsertarCoche.setText("Insertar Coche");
        InsertarCoche.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                InsertarCocheActionPerformed(evt);
            }
        });
        VerCoches.add(InsertarCoche);

        EliminarCoche.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK));
        EliminarCoche.setText("Eliminar Coche");
        EliminarCoche.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                EliminarCocheActionPerformed(evt);
            }
        });
        VerCoches.add(EliminarCoche);

        ActualizarCoche.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK));
        ActualizarCoche.setText("Actualizar Coche");
        ActualizarCoche.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ActualizarCocheActionPerformed(evt);
            }
        });
        VerCoches.add(ActualizarCoche);

        jMenu1.setText("Ver Coches");

        VistaTabla.setText("Vista Tabla");
        VistaTabla.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                VistaTablaActionPerformed(evt);
            }
        });
        jMenu1.add(VistaTabla);

        VistaForm.setText("Vista Formulario");
        VistaForm.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                VistaFormActionPerformed(evt);
            }
        });
        jMenu1.add(VistaForm);

        VerCoches.add(jMenu1);

        jMenuBar1.add(VerCoches);

        AcercaDe.setText("Ayuda");
        AcercaDe.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                AcercaDeActionPerformed(evt);
            }
        });

        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem1.setText("Acerca de");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        AcercaDe.add(jMenuItem1);

        jMenuBar1.add(AcercaDe);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void InsertarCocheActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_InsertarCocheActionPerformed
        JFInsCoches jfic = new JFInsCoches();
        jfic.setVisible(true);
    }//GEN-LAST:event_InsertarCocheActionPerformed

    private void EliminarCocheActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_EliminarCocheActionPerformed
        JFEliminarCoches jfec=new JFEliminarCoches();
        jfec.setLocationRelativeTo(null);
        jfec.setVisible(true);
    }//GEN-LAST:event_EliminarCocheActionPerformed

    private void ActualizarCocheActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ActualizarCocheActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ActualizarCocheActionPerformed

    private void VistaTablaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_VistaTablaActionPerformed
        JFVerCochesTabla jfvt=new JFVerCochesTabla();
        jfvt.setLocationRelativeTo(null);
        jfvt.setVisible(true);
    }//GEN-LAST:event_VistaTablaActionPerformed

    private void AcercaDeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AcercaDeActionPerformed
        System.out.println("Autor: Krum");
    }//GEN-LAST:event_AcercaDeActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        String text = "<html><b>Concesionarios Vivó</b><br><b>Version:</b> 1.0.0<br><b>Autor: </b>Miquel Vivó Santaisabel</html>";
        JOptionPane.showMessageDialog(null,text,"Acerca de",1);
//        "\n\nVersion: 1.0.0\nAutor: Miquel Vivó Santaisabel"
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void VistaFormActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_VistaFormActionPerformed
        JFVerCoches jfcf= new JFVerCoches();
        jfcf.setVisible(true);
    }//GEN-LAST:event_VistaFormActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        System.exit(0);
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(JFPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(JFPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(JFPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(JFPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>


        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new JFPrincipal().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu AcercaDe;
    private javax.swing.JMenuItem ActualizarCoche;
    private javax.swing.JMenuItem EliminarCoche;
    private javax.swing.JMenuItem InsertarCoche;
    private javax.swing.JMenu VerCoches;
    private javax.swing.JMenuItem VistaForm;
    private javax.swing.JMenuItem VistaTabla;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenuArchivo;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    // End of variables declaration//GEN-END:variables
}
